home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
newsgrp
/
group96b.txt
/
000015_icon-group-sender _Tue Oct 8 11:02:58 1996.msg
< prev
next >
Wrap
Internet Message Format
|
1997-01-02
|
2KB
Received: by cheltenham.cs.arizona.edu; Tue, 8 Oct 1996 12:22:18 MST
To: icon-group@cs.arizona.edu
Date: Tue, 8 Oct 1996 11:02:58 GMT
From: seldon@eskimo.com (Will Mengarini)
Message-Id: <DyyEoz.L0D@eskimo.com>
Organization: Eskimo North (206) For-Ever
Sender: icon-group-request@cs.arizona.edu
References: <bezeau.62.844696848@jupiter.csd.unb.ca>
Subject: Re: Parsing the Icon command line
Errors-To: icon-group-errors@cs.arizona.edu
bezeau@jupiter.csd.unb.ca (Larry Bezeau) writes:
>h:\>type v:\cmdline.icn
>procedure main(C)
> every write(&output,C[1 to *C])
>end
>h:\>c:\dos\command.com /c v:\cmdline.exe "A B" \"C D\"
>A
>B
>C D
That doesn't perform the test you want, since by invoking command.com
with /c on your shell's command line, you're giving your shell a chance
to munge the arguments *before* it passes them to command.com, which
then munges them further before passing them to Icon, which then munges
them further before passing them to your cmdline program. To test
command.com for real, just invoke it as a subshell (use the command
command
to get into it, & the command
exit
to get out).
Then try
cmdline \"A" "B\" etc
but don't ask me why it preserves the spaces in between A & B; I just
found it by random hacking. Icon is clearly making serious improvements
to the args before you see them, as the batch job
Echo %1 %2 %3 %4 %5 %6 %7 %8 %9
will let you see; command.com preserves the quotes.
Will Mengarini <seldon@eskimo.com>
"We are beginning to perceive how free world populations move with a
ghostly sixth sense to nurture group survival. Consider a presidential
election where the choice is between two second-rate candidates. The
[U.S.] election of 1988 is a good example. An objective observer is
struck by the fact that the people give the Presidency to one party and
deliver the Congress to the opposition, thereby rendering to a minimum
the damage potential of an incompetent."
--from p124 of /Let Us Prey/ by Bill Branon